<%@ page language="java" import="java.util.*,java.net.URLDecoder" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String loginName="";
String uid="";
Cookie[] cookArr = request.getCookies();
if(cookArr!=null){
	for(Cookie c:cookArr){
		if(c.getName().equals("LOGINNAME")){
			loginName = URLDecoder.decode(c.getValue(),"UTF-8");
		}
		if(c.getName().equals("UID")){
			uid = c.getValue();
		}
		c.getValue();
	}
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
<html>
<head>
<title>商品详情页面 </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 
<link href="../css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- start details -->
<link rel="stylesheet" type="text/css" href="../css/productviewgallery.css" media="all" />
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/cloud-zoom.1.0.3.min.js"></script>
<script type="text/javascript" src="../js/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="../js/jquery.fancybox-buttons.js"></script>
<script type="text/javascript" src="../js/jquery.fancybox-thumbs.js"></script>
<script type="text/javascript" src="../js/productviewgallery.js"></script>
<!-- start top_js_button -->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/move-top.js"></script>
<script type="text/javascript" src="../js/easing.js"></script>
   <script type="text/javascript">
		jQuery(document).ready(function($) {
			$(".scroll").click(function(event){		
				event.preventDefault();
				$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
			});
		});
		function orders(){
			document.shopCar.action ="<%=basePath%>orders/ordersList.do"
 			document.shopCar.submit();
		}
	</script>
</head>
<body>
<div class="header_bg">
		<div class="wrap">
			<div class="header">
				<div class="logo">
					<a href="index.html"><img src="../images/logo.png" alt=""/> </a>
				</div>
				<div class="h_icon">
				<ul class="icon1 sub-icon1">
					<li><a class="active-icon c1" href="#"><i>$300</i></a>
						<ul class="sub-icon1 list">
							<li><a href="<%=basePath%>shopCar/queryAll.do?uname=<%=loginName%>"><h4>我的购物车</h4></a></li>
							<li><a href="<%=basePath%>orders/queryAll.do?uname=<%=loginName%>"><h4>我的订单</h4></a></li>
							<li><a href="<%=basePath%>buyer/preEditBuyer.do?uname=<%=loginName%>"><h4>修改个人信息</h4></a></li>
							
						</ul>
					</li>
				</ul>
				</div>
				<div class="pic"><img alt="图片不存在" src="${user.upicture }" width="70px" height="70px"></div> 
				<div class="login2">
					<div class="user"><a href="<%=basePath%>user/preLogin.do"><h5>切换账号</h5></a></div>
				</div>
				
				<div class="h_search">
		    		<form action="<%=basePath%>shop/queryBySname1.do">
		    			<input type="text" value="" placeholder="商品名称" name="sname">
		    			<input type="submit" value="">
		    		</form>
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</div>
	<div class="header_btm">
		<div class="wrap">
			<div class="header_sub">
				<div class="h_menu">
					<ul>
						<li class="active"><a href="<%=basePath%>orders/selectAll.do?uname=<%=loginName %>">主页</a></li> |
						<li><a href="<%=basePath%>shop/type1.do?uname=<%=loginName %>&product_type=面膜">面膜</a></li> |
						<li><a href="<%=basePath%>shop/type2.do?uname=<%=loginName %>&product_type=护肤套装">护肤套装</a></li> |
						<li><a href="<%=basePath%>shop/type3.do?uname=<%=loginName %>&product_type=眼霜">眼霜</a></li> |
						<li><a href="<%=basePath%>shop/type4.do?uname=<%=loginName %>&product_type=水乳">水乳</a></li> |
						<li><a href="<%=basePath%>shop/type5.do?uname=<%=loginName %>&product_type=口红">口红</a></li> |
						<li><a href="<%=basePath%>shop/type6.do?uname=<%=loginName %>&product_type=精华">精华</a></li> |
						<li><a href="<%=basePath%>shop/type7.do?uname=<%=loginName %>&product_type=洁面">洁面</a></li> |
						<li><a href="<%=basePath%>shop/type8.do?uname=<%=loginName %>&product_type=粉底">粉底</a></li> |
						<li><a href="<%=basePath%>shop/type9.do?uname=<%=loginName %>&product_type=眼影眼线">眼影眼线</a></li> |
						<li><a href="<%=basePath%>shop/type10.do?uname=<%=loginName %>&product_type=香水">香水</a></li>
					</ul>
		       	</div>	  
				<div class="clear"></div>
			</div>
		</div>
<!-- start main -->
<div class="main_bg">
<div class="wrap">	
	<div class="main">
	<!-- start content -->
	<div class="single">
			<!-- start span1_of_1 -->
		<div class="left_content">
			<div class="span1_of_1">
				<!-- start product_slider -->
				<div class="product-view">
				    <div class="product-essential">
				        <div class="product-img-box">
				  			
				    		<div class="product-image"> 
				       			 <a class="cs-fancybox-thumbs cloud-zoom" rel="adjustX:30,adjustY:0,position:'right',tint:'#202020',tintOpacity:0.5,smoothMove:2,showTitle:true,titleOpacity:0.5" data-fancybox-group="thumb" href="${shop.picture }" >
				           			<img src="${shop.picture }" />
				        		</a>
				   			</div>
					
						</div>
					</div>
				</div>
				<!-- end product_slider -->
			</div>
			<!-- start span1_of_1 -->
			<div class="span1_of_1_des">
				  <div class="desc1">
					<h3>${shop.sname }</h3>
					<p>${shop.sdescribe }</p>
					<h5>${shop.price } </h5>
					<div class="available">
						<h4>运费 :&nbsp;&nbsp;快递包邮</h4>
						<form action="<%=basePath%>shopCar/addShopCar.do?" name="shopCar"> 
							<ul>
							<li>数量:
								<select name="gnumber">
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
								</select>
							</li>
						</ul>
						<div class="btn_form">
							<input type="hidden" name="uid" value="<%=uid%>">
							<input type="hidden" name="uname" value="<%=loginName%>">
							<input type="hidden" name="shop_id" value="${shop.shop_id}">
							<input class="button1" type="button" id="button1" value="立即购买" onclick="orders()" />
							<input class="submit1" type="submit" value="加入购物车"  /> 
							
							</form>
						</div>
						
						<div class="clear"></div>
					</div>
					<div class="share-desc">
						<div class="share">
							<h4>分享商品 :</h4>
							<ul class="share_nav">
								<li><a ><img src="../images/facebook.png" title="facebook"></a></li>
								<li><a ><img src="../images/twitter.png" title="Twiiter"></a></li>
								<li><a ><img src="../images/rss.png" title="Rss"></a></li>
								<li><a ><img src="../images/gpluse.png" title="Google+"></a></li>
				    		</ul>
						</div>
						<div class="clear"></div>
					</div>
			   	 </div>
			   	</div>
			   	<div class="clear"></div>
			   	<!-- start tabs -->
				   	<section class="tabs">
		            	<input id="tab-1" type="radio" name="radio-set" class="tab-selector-1" checked="checked">
			        	<label for="tab-1" class="tab-label-1">商品详情</label>
			
		           		 <input id="tab-2" type="radio" name="radio-set" class="tab-selector-2">
			       	 	<label for="tab-2" class="tab-label-2">配送快递</label>
			  
				    	<div class="clear-shadow"></div>
					
				        <div class="content">
					        <div class="content-1">
					        	<p class="para top"> ${shop.sdescribe}</p>
								<div class="clear"></div>
							</div>
					        <div class="content-2">
								<p class="para"> 店铺两周年店庆，为答谢新老顾客本店商品全场包邮<br>合作的快递有：中通快递、韵达快递、申通快递、圆通快递；需要的快递下单时自行备注哦！</p>	
							</div>
					        
							</div>
				        </div>
			        </section>
			        
			        <div class="longPic">
			        	<img src="${shop.images }" >
			        </div>
		         	<!-- end tabs -->
			   	</div>
			   	<!-- start sidebar -->
			 <div class="left_sidebar">
					<div class="sellers">
						<h4>看了又看</h4>
						<div class="single-nav">
			                <ul >
				               <c:if test="${list!=null }">
		    						<c:forEach items="${list}" var="shop">
					                   	<li>
					                   		<a href="<%=basePath%>shop/details.do?shop_id=${shop.shop_id}"><img src="${shop.picture }"></a>
					                   		<div class="price">${shop.price }</div>
					                   	</li>
			                  	 </c:forEach>
			                   </c:if>
			                </ul>
			              </div>
						  
					</div>
				</div>
					<!-- end sidebar -->
          	    <div class="clear"></div>
	       </div>	
	<!-- end content -->
	</div>
</div>
</div>		
<!-- start footer -->
<div>
		<iframe src="../footer.html" width="100%"; height="450px" frameborder="0" scrolling="no" name="headFrame" style="position: absolute;z-index:9999;"></iframe>
	</div> 

</body>
</html>